#ifndef QWIDGETGUIEVENTDISPATCHERADAPTER_H
#define QWIDGETGUIEVENTDISPATCHERADAPTER_H

#include "gui/guieventdispatcher.h"

using namespace gui;

namespace qtgui
{

    /**
    *   Qt widget,event -> GuiEventDispatcher event from_qt
    */

    class QWidgetGuiEventDispatcherAdapter : public QWidget
    {        
		GuiEventDispatcher* guieventdispatcher;

    public:
        QWidgetGuiEventDispatcherAdapter(QWidget* parent);
        virtual ~QWidgetGuiEventDispatcherAdapter();

        void setDelegate(GuiEventDispatcher* _delegate);

    protected:

        virtual void paintEvent(QPaintEvent *evt);

        virtual void resizeEvent(QResizeEvent *evt);

        virtual void mousePressEvent(QMouseEvent *evt);

        virtual void mouseReleaseEvent(QMouseEvent *evt);

        virtual void mouseDoubleClickEvent(QMouseEvent *evt);

        virtual void mouseMoveEvent(QMouseEvent *evt);

        virtual void wheelEvent(QWheelEvent *evt);

        virtual void keyPressEvent(QKeyEvent *evt);

        virtual void keyReleaseEvent(QKeyEvent *evt);

    };

}
#endif //QWIDGETGUIEVENTDISPATCHERADAPTER_H

